home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / B-C / C++ FAQ Reference 1.0 / C++ FAQ Reference 1.0.rsrc / TEXT_734.txt < prev    next >
Encoding:
Text File  |  1993-06-30  |  395 b   |  3 lines

  1. The best way is: don't do it.
  2.  
  3. The most portable way to compare against the nil ptr is to compare against '0'. Some programmers use a #define to set NULL to '0', but that can conflict with the way the standard libraries #define NULL.  There is no portable way to define a 'const' ptr called 'NULL' that can be compared against any arbitrary ptr -- the literal '0' is acceptable for this however.